package site.isscloud.project.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * 温度趋势响应对象
 */
public class TemperatureTrendResponse {
    /** 设备编号 */
    private String deviceNo;

    /** 通道号 */
    private Integer channelNo;

    /** 时间标签数组 */
    private List<String> timeLabels;

    /** 米标温度数据列表 */
    private List<MeterTemperatureData> meterData;

    public TemperatureTrendResponse() {
        this.meterData = new ArrayList<>();
    }

    public TemperatureTrendResponse(String deviceNo, Integer channelNo, List<String> timeLabels) {
        this.deviceNo = deviceNo;
        this.channelNo = channelNo;
        this.timeLabels = timeLabels;
        this.meterData = new ArrayList<>();
    }

    public TemperatureTrendResponse(String deviceNo, Integer channelNo, List<String> timeLabels, List<MeterTemperatureData> meterData) {
        this.deviceNo = deviceNo;
        this.channelNo = channelNo;
        this.timeLabels = timeLabels;
        this.meterData = meterData != null ? meterData : new ArrayList<>();
    }

    // Getter and Setter
    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public Integer getChannelNo() {
        return channelNo;
    }

    public void setChannelNo(Integer channelNo) {
        this.channelNo = channelNo;
    }

    public List<String> getTimeLabels() {
        return timeLabels;
    }

    public void setTimeLabels(List<String> timeLabels) {
        this.timeLabels = timeLabels;
    }

    public List<MeterTemperatureData> getMeterData() {
        return meterData;
    }

    public void setMeterData(List<MeterTemperatureData> meterData) {
        this.meterData = meterData != null ? meterData : new ArrayList<>();
    }

    @Override
    public String toString() {
        return "TemperatureTrendResponse{" +
                "deviceNo='" + deviceNo + '\'' +
                ", channelNo=" + channelNo +
                ", timeLabels=" + timeLabels +
                ", meterData=" + meterData +
                '}';
    }
}